package com.kehutong.repair.entity;

import com.kehutong.repair.enums.OperationType;
import com.kehutong.repair.enums.TimeUnit;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;


/**
 * 报修类型
 */
@Table(value="t_repairs_type", comment="报修类型", multi=true)
public class RepairsType extends Entity {

    private static final long serialVersionUID = 8198526280177937605L;

    protected RepairsType(String id) {
        super(id);
    }

    @Column(comment = "名称")
    private String name;

    @Column(comment = "上级id")
    private String pid;

    @Column(comment = "执行人身份的id")
    private String exeRoleId;

    @Column(comment = "关注人身份的id")
    private String attnRoleId;

    @Column(comment = "限时")
    private int time;

    @Column(comment = "限时单位")
    private TimeUnit unit;

    @Column(comment = "排序")
    private int sort;

    @Column(comment = "类型")
    private OperationType type;

    @UnSave
    private String exeRoleName;

    @UnSave
    private String attnRoleName;

    @JSONField(serialize=false)
    @Column(comment="逻辑删除")
    private boolean deleted;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getExeRoleId() {
        return exeRoleId;
    }

    public void setExeRoleId(String exeRoleId) {
        this.exeRoleId = exeRoleId;
    }

    public String getAttnRoleId() {
        return attnRoleId;
    }

    public void setAttnRoleId(String attnRoleId) {
        this.attnRoleId = attnRoleId;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public TimeUnit getUnit() {
        return unit;
    }

    public void setUnit(TimeUnit unit) {
        this.unit = unit;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getExeRoleName() {
        return exeRoleName;
    }

    public void setExeRoleName(String exeRoleName) {
        this.exeRoleName = exeRoleName;
    }

    public String getAttnRoleName() {
        return attnRoleName;
    }

    public void setAttnRoleName(String attnRoleName) {
        this.attnRoleName = attnRoleName;
    }

    public OperationType getType() {
        return type;
    }

    public void setType(OperationType type) {
        this.type = type;
    }
}
